|
|
 |
|
|
|
|
CPUType = mlngCPUType
End Property
Public Property Get NumCPU() As Long
Call GetSysInfo
NumCPU = mlngNumCPU
End Property |
|
|
|
|
|
|
|
|
To retrieve all the memory and system information, you need to make two different Windows API calls. Both calls rely on user-defined types that are passed in by reference and are returned with system information. The two calls are GlobalMemoryStatus() and GetSystemInfo(): |
|
|
|
 |
|
|
|
|
Private Sub GetSysInfo()
Dim typMS As MEMORYSTATUS
Dim typSI As SYSTEM_INFO
' If the current system information is not current,
' requery the system for it.
If Not IsInfoCurrent() Then
' Get the global memory status information.
typMS.dwLength = Len(typMS) Call GlobalMemoryStatus(typMS)
mlngMemoryLoad = typMS.dwMemoryLoad
mlngTotalPhysical = typMS.dwTotalPhys
mlngAvailPhysical = typMS.dwAvailPhys
mlngTotalVirtual = typMS.dwTotalVirtual
mlngAvailVirtual = typMS.dwAvailVirtual
' Get the system information. Call GetSystemInfo(typSI)
mlngNumCPU = typSI.dwNumberOrfProcessors
mlngCPUType = typSI.dwProcessorType
' Get Windows Directory Information
Call WinDirInfo
|
|
|
|
|
|